package com.tjmc.tiomsresource.service.impl;

import com.tjmc.tiomscore.dao.TranPtnHwEspMapper;
import com.tjmc.tiomscore.model.TranPtnHwEsp;
import com.tjmc.tiomsresource.parser.CMEspParser;
import com.tjmc.tiomsresource.service.CMEspService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.File;
import java.util.List;

/**
 * @author Luc
 * @version 1.0
 * @date 2020-05-20 15:41
 */
@Service("cmEspService")
public class CMEspServiceImpl extends CMSuperServiceImpl<TranPtnHwEsp> implements CMEspService {

    @Autowired
    private CMEspParser cmEspParser;
    @Autowired
    private TranPtnHwEspMapper tranPtnHwEspMapper;

    @Override
    public CMEspParser getParser() {
        return cmEspParser;
    }

    @Override
    public TranPtnHwEspMapper getMapper() {
        return tranPtnHwEspMapper;
    }

    @Override
    public boolean saveTranPtnHwDataToDB(List<File> xmlFiles) {
        return this.saveTranPtnHwDataToDB(xmlFiles, "ESP");
    }
}
